1. Field of the Invention
The present invention relates to a bar code reader for detecting a bar code signal and for reading a bar code. In particular, the present invention relates to a multiple-row bar code reading apparatus for reading a bar code consisting of a plurality of rows each of which has left and right blocks, like EAN code.
In recent years, bar code systems, including multiple-row bar code systems have been used in various fields such as supermarkets.
A conventional bar code reader which reads a multiple-row bar code, consisting of n rows each of which having left and right blocks, determines whether or not the multiple row bar code is sequence data. When the bar code is sequence data, the bar code reader treats the sequence data as data to sequentially read. The sequence data also contains valid data for a modulo 10 check.
2. Description of the Related Art
FIG. 1 is a block diagram showing a conventional bar code reading apparatus which reads a bar code consisting of n rows. In FIG. 1, reference numeral 2 is a laser generating portion. The laser generating portion 2 radiates laser light (namely, a laser beam) onto the surface of a substance (for example, a merchandise item) on which a bar code 1 consisting of n rows is disposed. To read the bar code 1, the spot of the laser light is moved. The laser light is reflected at the bar code 1. The reflected light is exposed to a detector 3. The detector 3 generates a signal corresponding to black and white portions of the bar code as a reception signal. In addition, light reflected from other than the bar code 1 is also exposed to the detector 3. The reception signal is sent to a binary forming circuit 4. The binary forming circuit 4 converts the reception signal into binary data.
FIG. 2 is a schematic diagram for explaining the binary-formation of a bar code. A bar code consists of black bars and white bars. For example, when the detector 3 detects a black bar, it outputs a high (H) level pulse. In contrast, when the detector 3 detects a white bar, it outputs a low (L) level pulse. As shown in FIG. 2, the binary forming circuit 4 outputs binary pulses corresponding to the bar code being read.
The binary pulses are sent to a bar width counter 5. The bar width counter 5 calculates the width of each pulse received from the binary forming circuit 4. In other words, the bar width counter 5 counts the number of clock pulses after the leading edge of a binary pulse takes place until the trailing edge thereof takes place and the number of clock pulses after the trailing edge of a binary pulse takes place until the leading edge of the next binary pulse takes place. FIG. 3 is a schematic diagram for explaining digitization of the bar width counter 5. In the FIG. 3, the bar width counter 5 counts four clock pulses in a first H level. Next, the bar width counter 5 counts eight clock pulses in the subsequent L level. The bar width counter 5, however, counts eight clock pulses in a second H level.
The digitized data formed by the bar width counter 5 is sent to a bar code detecting portion 6. The bar code detecting portion 6 retrieves bar code data from the digitized data. When a bar code is read by radiating laser light thereon, the laser light is also radiated to other portions. The bar code detecting portion 6 detects laser light which is reflected from the bar code region.
The bar code data extracted by the bar code detecting portion 6 is sent to a bar code data decoding portion 7. The bar code data decoding portion 7 decodes the bar code data into numeric data of the bar code. The numeric data of the bar code is sent to a bar code data editing portion 8 and a sequence data detecting portion 9.
The sequence data detecting portion 9 determines whether or not the currently decoded bar code data is continued to bar code data which has been decoded just before.
FIG. 4 is a schematic diagram for explaining a multiple-row bar code. Each row of a bar code has a left block and a right block. Between the left block and the right block, a center bar is located. Outside the left and right blocks, guard bars are located. To read such a bar code, for example, after the left block is decoded, the right block is decoded. However, the decoding may be performed in the reverse order (namely, from the right block to the left block). The case in which the decoding is performed from the left block to the right block is described below. In FIG. 4, the right block date and the left block data are decoded in sequence. These data are referred to as sequence data.
The sequence data detecting portion 9 detects such sequence data and sends the detected result to the bar code data editing portion 8. The bar code data editing portion 8 includes a modulo 10 check circuit which performs a modulo 10 check for the input data. The bar code data editing portion 8 combines the decoded data of the left and right blocks so as to form one bar code data. The modulo 10 check circuit performs the modulo 10 check for the combined data. The result is sent to a determination portion 10.
Bar codes corresponding to JAN, EAN, and UPC systems have check digit data for checking whether or not their decoded values are valid. When the check digit data is valid, it is named valid data in the modulo 10 check. Next, a method for calculating the check digit data will be described.
At step ST1, all the values of even-digit characters starting from the second least significant digit are summed. At step ST2, the result of the step ST1 is tripled. At step ST3, all the values of odd-digit characters starting from the third least significant digit are summed. At step ST4, the result of the step ST2 and the result of the step ST3 are added. At step ST5, a multiple of 10 which is larger than and most close to the result of the step ST4 is calculated. The difference between the result of the step ST5 and the result of the step ST4 is the value of the check digit data. If the value of the check digit data is equal to the value of the least significant digit, the bar code data is treated as valid data in the modulo 10 check.
For example, when the bar code character value is 2018189166101, the value of the least significant digit "1" is a check digit value.
At the step ST1, 0+6+1+8+8+0=23 is obtained.
At the step ST2, 23.times.3=69 is obtained.
At the step ST3, 1+6+9+1+1+2=20 is obtained.
At the step ST4, 69+20=89 is obtained.
At the step ST5, 90-89=1 is obtained.
The determination portion 10 comprises detecting portions 10-1 and 10-2. The detecting portion 10-1 detects whether or not the number of valid data in the modulo 10 check is n or more. The detecting portion 10-2 detects whether or not the number of sequence data is n. When all these conditions are satisfied, the determination portion 10 treats n sequence data as validly read data. With the above-described process, the conventional bar code reader checks whether or not a multiple-row bar code being read is valid.
As described above, in the conventional bar code reader, all bar code data consisting of n rows each of which has left and right blocks should be sequence data. In addition, the bar code data should be valid data in the modulo 10 check. However, when each row of bar code data consisting of n rows is sequence data, the area to which the laser beam is radiated becomes narrow, thereby deteriorating the reading efficiency. For example, in FIG. 4, when the laser beam is moved in a slant direction, with one movement of the laser beam, both the left and right blocks of a row of a bar code cannot be read at one time, resulting in a reading error (namely, no good reading). And if non-sequence data are permitted, in the case where a bar code is read by moving a laser beam in a grid pattern, even if both left and right blocks on different rows are correctly read, a reading error takes place. In addition, when bar code data is erroneously read, the erroneous data may be output corresponding to only sequence data.